<div class="main">
	<div class="container" style="margin-bottom: 20px;">
		<div id="slideBox" class="slideBox2">
			<div class="hd">
				<ul>
					{volist name="banner" id="item"}
					<li></li>
					{/volist}
				</ul>
			</div>
			<div class="bd">
				<ul>
					{volist name="banner" id="item"}
					<li><a href="{$item.url}" target="_blank"><img src="{$item.image}" /></a></li>
					{/volist}
				</ul>
			</div>

			<!-- 下面是前/后按钮代码，如果不需要删除即可 -->
			<a class="prev" href="javascript:void(0)"></a>
			<a class="next" href="javascript:void(0)"></a>
		</div>
		<div style="display: flex;justify-content: space-between;">
			<div style="width: 880px; padding:40px 20px 20px;background: #fff;">
				<div style="display: flex; align-items: center; justify-content: center;">
					<div class="center_form" style="width: 320px;">
						<form class="layui-form" action="">
							<div class="layui-form-item" >

								<select lay-filter="demo-select-filter" id="type">
									<option value="0" {if($type==0)}selected{/if}>专有技术认定</option>
									<option value="1" {if($type==1)}selected{/if}>专业技能培训</option>
								</select>

							</div>
							<div class="layui-form-item">

								<input type="search" id="keyword" lay-verify="required" placeholder="{if($type==0)}输入完成单位/认定编号/技术名称{else/}输入证书编号/身份证号{/if}"
									autocomplete="off" class="layui-input">

							</div>

						</form>
						<div class="btn" style="margin-top:30px;">
							<button type="button"
								class="layui-btn layui-btn-lg layui-btn-fluid layui-btn-normal layui-btn-radius"
								onclick="submit()">查询</button>
						</div>

						{if($rs==='')}
						<div style="text-align: center;">
							<img src="/pc/img/ico_zhengshuchaxun.png" style="width: 200px; height:auto;">
							<p style="text-align: center;">请输入关键字查询证书</p>
						</div>
						{elseif(!is_null($rs)) /}
							{if($type==0)}
								<div class="zhengshuchaxun_result">
									<div>认定编号：{$rs.rendingbianhao}</div>
									<div>技术名称：{$rs.jishumingcheng}</div>
									<div>完成单位：{$rs.wanchengdanwei}</div>
									<div>参与人：{$rs.canyuren}</div>
									<div>有效期：{$rs.youxiaoqi}</div>
								</div>
							{else /}
								<div class="zhengshuchaxun_result">
									<div>证书编号：{$rs.zhengshubianhao}</div>
									<div>培训名称：{$rs.peixunmingcheng}</div>
									<div>姓名：{$rs.xingming}</div>
									<div>性别：{$xingbie_arr[$rs.xingbie]}</div>
									<div>身份证号：{$rs.shenfenzhenghao}</div>
									<div>结业时间：{$rs.jieye_date}</div>
									<div>成绩：{$rs.chengji}</div>
								</div>
							{/if}
						{else /}
							<div style="text-align: center;">
								<img src="/mobile/img/ico_empty.png" style="width: 200px; height:auto;">
								<p style="text-align: center;">没有查询到相关数据</p>
							</div>

						{/if}

					</div>


				</div>

			</div>
			<div style="width: 310px;">
				{volist name="hangyexinxi_type2" id="item"}
				<div class="arclist_303" style="margin-bottom: 10px;">
					<div class="list_title">{$item.name}</div>
					<ul class="news_list" style="height: auto;">
						{volist name="item['list']" id="detail_item"}
						<a href="{:url('hangyexinxi/detail',['id'=>$detail_item.id])}">
							<li>{$detail_item.title}</li>
						</a>
						{/volist}
					</ul>
				</div>
				{/volist}
			</div>
		</div>
	</div>
</div>
<script>
	jQuery(".slideBox2").slide({
		mainCell: ".bd ul",
		autoPlay: true
	});
	layui.use(function(){
	  var form = layui.form;
	  var layer = layui.layer;
	  // select 事件
	  form.on('select(demo-select-filter)', function(data){
	    //var elem = data.elem; // 获得 select 原始 DOM 对象
	    var value = data.value; // 获得被选中的值
	    //var othis = data.othis; // 获得 select 元素被替换后的 jQuery 对象

	    //layer.msg(this.innerHTML + ' 的 value: '+ value); // this 为当前选中 <option> 元素对象
		window.location.href="{:url('index/zhengshu')}?type="+value;
	  });
	});

	function submit(){
	    if($('#keyword').val().trim()==''){
	        layer.msg('请输入查询内容')
	        return false;
	    }
		window.location.href="{:url('index/zhengshu')}?type="+$('#type').val()+'&keyword='+$('#keyword').val().trim();
	}
</script>
